package com.feiyuan.core.service;

import com.feiyuan.core.pojo.entity.AdminMenu;
import com.feiyuan.core.pojo.entity.AdminRoleMenu;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Xupf
 * @since 2022-09-06
 */
public interface AdminRoleMenuService extends IService<AdminRoleMenu> {

    /**
     * 查询所有的权限
     * @return
     */
    List<AdminMenu> selectMenus();

    /**
     * 保存或者修改
     */
    void saveOrUpdateMenus(AdminRoleMenu adminRoleMenu);

    /**
     * 通过角色查询所属菜单
     * @param roleId
     * @return
     */
    List<Long> getByRoleId(Long roleId);

    /**
     * 查询用户的权限
     * @return
     */
    List<String> selectUserMenus(Long userId);
}
